Encoding and storing text using dna sequences

ABSTRACT

Text can be encoded into DNA sequences. Each word from a document or other text sample can be encoded in a DNA sequence or DNA sequences and the DNA sequences can be stored for later retrieval. The DNA sequences can be stored digitally, or actual DNA molecules containing the sequences can be synthesized and stored. In one example, the encoding technique makes use of a polynomial function to transform words based on the Latin alphabet into k-mer DNA sequences of length k. Because the whole bits required for the DNA sequences are smaller than the actual strings of words, storing documents using DNA sequences may compress the documents relative to storing the same documents using other techniques. In at least one example, the mapping between words and DNA sequences is one-to-one and the collision ratio for the encoding is low.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/241,361 filed Apr. 27, 2021, which is a continuation of U.S. patentapplication Ser. No. 16/143,671 filed Sep. 27, 2018 (now U.S. Pat. No.11,017,170). The contents of each of the foregoing are herebyincorporated by reference into this application as if set forth hereinin full.

TECHNICAL FIELD

This disclosure generally relates to encoding textual information. Morespecifically, this disclosure relates to using DNA sequences to encodewords.

REFERENCE TO SEQUENCE LISTING SUBMITTED VIA EFS-WEB

This application includes an electronically submitted sequence listingin .txt format. The .txt file contains a sequence listing entitled“0ATTMISC10-1098009 ST25.txt” created on Jan. 2, 2019, and is 470 bytesin size. The sequence listing contained in the .txt file is part of thespecification and is hereby incorporated by reference herein in itsentirety.

BACKGROUND

The volume of documents that have historical significance is everincreasing. But available physical storage space is not. Density can beincreased with compression techniques, especially those that aretailored to the type of information being stored by taking advantage ofpredictable properties in the information. Certain types of media, suchas write-once optical discs, exhibit more longevity than other types ofmedia, such as magnetic discs. But thermodynamics does not favorinformation lasting a long time. Active archiving can be used to shuttledata between media in a storage network to overcome media degradationover time, but with a cost in terms of energy.

SUMMARY

In one example, a system includes a storage device, a non-transitorycomputer-readable medium including computer program code for DNAencoding of text, and a processing device communicatively coupled to thestorage device and the non-transitory computer-readable medium. Theprocessing device is configured for executing the computer program codeto perform operations. The operations include receiving a word to beconverted into a DNA sequence, determining a value of a polynomialfunction based on the word, obtaining a remainder of a modulus of thevalue of the polynomial function, converting the remainder of themodulus into the DNA sequence, and storing the DNA sequence in thestorage device.

In another example, a method includes receiving a word to be convertedinto a DNA sequence and determining a value of a polynomial functionbased on the word. The method also includes obtaining a remainder of amodulus of the value of the polynomial function and converting theremainder of the modulus into the DNA sequence. The method furtherincludes storing the DNA sequence in a storage device.

In another example, a non-transitory computer-readable medium includescomputer program code executable by a processor to cause the processorto perform operations. The operations include receiving a word to beconverted into a DNA sequence, determining a value of a polynomialfunction based on the word, and obtaining a remainder of a modulus ofthe value of the polynomial function. The operations further includeconverting the remainder of the modulus into the DNA sequence andstoring the DNA sequence in a storage device.

BRIEF DESCRIPTION OF THE FIGURES

These and other features, aspects, and advantages of the presentdisclosure are better understood when the following Detailed Descriptionis read with reference to the accompanying drawings.

FIG. 1 is a block diagram depicting a system for encoding and storingwords in DNA sequences according to some aspects of the presentdisclosure.

FIG. 2 is a flowchart illustrating a process for encoding and storingwords in DNA sequences according to some aspects of the presentdisclosure.

FIG. 3 is a flowchart illustrating a process used in encoding wordsaccording to additional aspects of the present disclosure.

FIG. 4 is a flowchart illustrating an additional process used inencoding words according to further aspects of the present disclosure.

FIG. 5 is a collision ratio diagram for an example of DNA-encoded textproduced by a system for encoding and storing words in DNA sequencesaccording to some aspects of the present disclosure.

DETAILED DESCRIPTION

Certain aspects of this disclosure relate to programmatically analyzinga word from a document or other text sample, encoding the word in a DNAsequence using a polynomial function of a numerical representation ofthe word, and storing the DNA sequence for later retrieval. The DNAsequence can be stored digitally, or an actual DNA molecule of thesequence can be synthesized and stored to take advantage of the factthat DNA molecules exhibit longevity under readily achievableconditions. Capturing and encoding words in a document in this fashionallows the document to be encoded into and stored as a collection of DNAsequences. Using DNA sequences to represent words, entire documents canbe stored, retrieved, compared, analyzed, and visualized in moreeffective ways than would be possible with more traditional storagetechniques.

In certain aspects, the encoding technique makes use of a polynomialfunction to transform words based on the Latin alphabet into k-mer DNAsequences of length k. Because the whole bits required for the DNAsequences are smaller than the actual strings of words, storingdocuments using DNA sequences may compress the documents relative tostoring the same documents using other techniques. In certain aspects,the mapping between words and DNA sequences is one-to-one and thecollision ratio for the encoding is very low, making for fast,efficient, and certain retrieval of the encoded text from storage.

Detailed descriptions of certain examples are discussed below. Theseillustrative examples are given to introduce the reader to the generalsubject matter discussed here and are not intended to limit the scope ofthe disclosed concepts. The following sections describe variousadditional aspects and examples with reference to the drawings in whichlike numerals indicate like elements, and directional descriptions areused to describe the illustrative examples but, like the illustrativeexamples, should not be used to limit the present disclosure.

Referring now to the drawings, FIG. 1 depicts an example of a system 100for encoding text into DNA sequences according to some aspects. Examplesof hardware components of the system 100 are depicted. The system 100includes server 102. Server 102 may be a computer or other machine thatprocesses the text words received within the system 100. The server 102may include one or more other systems. For example, the server 102 mayinclude adapters, routers, etc., for accessing network-attached datastores, a communications network, or both. In this example, server 102is connected to data network 103. The data network 103 can also beincorporated entirely within (or can include) the Internet, an intranet,an extranet, or a combination thereof. In one example, communicationsbetween two or more systems or devices can be achieved by a securecommunications protocol, such as secure sockets layer (“SSL”) ortransport layer security (“TLS”). The system 100 includes one or moreattached data stores 104, which can include stored DNA sequences. TheDNA sequences are produced from input text samples stored in one or moredata stores 107.

The system 100 of FIG. 1 also optionally includes one or more attacheddata stores 126, which further include a pre-encoded DNA dictionary ofsequences for commonly used words. Data stores 104, 107, and 126 may beconnected to server 102 over data network 103 instead of being connectedlocally as illustrated in FIG. 1. Server 102 further includes aprocessing device 108 communicatively coupled to a non-transitory memorydevice 110. Non-transitory memory device 110 is used to store computerprogram code instructions 112 for causing processing device 108 toperform operations for DNA encoding of text as described herein.Non-transitory memory device 110 may also include cached files 114, suchas text samples and DNA sequence files currently being used by theprocessing device to perform these operations. Processing device 108 caninclude a processor or multiple processors.

Still referring to FIG. 1, data network 103 in system 100 connectsserver 102 to DNA synthesis lab computer systems 116 and clientcomputing devices 118 and 124. The DNA synthesis optionally performedusing computer systems 116 may be an in-house capability of anenterprise that provides DNA sequence encoding using server 102 or maybe provided by a third party. Client computing device 118 in thisexample is a workstation through which text samples can be selected orentered by a user and sent over data network 103 to server 102 forstorage in data store 107, as part of cached files 114, or both. Clientcomputing device 124 is a mobile computing device through which textsamples can be selected or entered by a user and sent over data network103 to server 102 for storage in data store 107, as part of cached files114, or both.

The numbers of devices depicted in FIG. 1 are provided for illustrativepurposes. Different numbers of devices may be used. For example, whileeach device, server, and system in FIG. 1 is shown as a single device,multiple devices may instead be used. Each communication within thesystem 100 may occur over one or more data networks 103. Data networks103 may include one or more of a variety of different types of networks,including a wireless network, a wired network, or a combination of awired and wireless network. Examples of suitable networks include theInternet, a personal area network, a local area network (“LAN”), a widearea network (“WAN”), or a wireless local area network (“WLAN”). Awireless network may include a wireless interface or combination ofwireless interfaces. A wired network may include a wired interface. Thewired or wireless networks may be implemented using routers, accesspoints, bridges, gateways, or the like, to connect devices in the datanetwork 103.

Any computing device that implements DNA encoding according to at leastsome aspects of the present disclosure may contain many of the sameelements as described with respect to server 102 of FIG. 1. As anexample, a computing device may include a main processing device,control, and power logic, RAM, flash memory, a battery, and the audioand visual I/O. The processing device can execute one or more operationsfor transmitting, receiving, and decoding signals. The processing devicecan execute instructions stored in a non-transitory memory device suchas non-transitory memory device 110 to perform the operations. Theprocessing device can include one processing device or multipleprocessing devices. Non-limiting examples of a processing device includea field-programmable gate array (“FPGA”), an application-specificintegrated circuit (“ASIC”), a microprocessor, etc.

A memory device storing computer program instructions executable by theprocessing device can include any type of memory device that retainsstored information when powered off. A computer-readable medium caninclude electronic, optical, magnetic, or other storage devices capableof providing the processing device with computer-readable instructionsor other program code. Such a medium may store the instructions on aserver prior to installation in or programming of a proximity-basedsecurity mechanism. Non-limiting examples of a computer-readable mediuminclude (but are not limited to) magnetic disk(s), memory chip(s),read-only memory (ROM), random-access memory (“RAM”), an ASIC, aconfigured processing device, optical storage, or any other medium fromwhich a computer processing device can read instructions.

The processes discuss below are examples illustrating DNA encoding ofEnglish words. The techniques illustrated can be used with little or nomodification to encode words in any language that uses the Latinalphabet. The techniques can be applied to words in other languages,including languages that are not based on the Latin alphabet withappropriate modifications.

FIG. 2 depicts a flowchart illustrating a process 200 for providing DNAencoding of text according to some aspects of the present disclosure. Atblock 202, an input word is received by processing device 108, possiblyfrom the data store 107. If a stored DNA dictionary is being used, adetermination is made at block 204 by processing device 108 as towhether the input word is present in the DNA dictionary data store 126.If so, the DNA sequence for the word is stored at block 212 in datastores 104. Otherwise, the value F of a polynomial function of the wordis computed at block 206 by processing device 108.

Still referring to FIG. 2, at block 208, processing device 108determines the modulus of the kth power of two of F for encoding theword in a k-mer DNA sequence. At block 210, processing device 108converts a remainder from block 208 into the k-mer DNA sequence. Atblock 212, the k-mer DNA sequence is stored in data stores 104. At block214, if there are more words in the text sample to be encoded into DNAsequences, process 200 begins again at block 202. Otherwise, the DNAspecified by the sequences corresponding to the text sample issynthesized at block 216, for example, by a DNA synthesis lab that usescomputer systems 116. The DNA can then be stored for long-term use atblock 218.

For purposes of FIGS. 3 and 4, an illustrative example of a word to beencoded will be discussed. Specifically, the word “music” will be used.FIG. 3 illustrates the process of block 206 of FIG. 2 according to someaspects of the present disclosure. At block 302, each letter of the wordis converted into upper case. For example, “music,” “Music,” or “MUSIC”are all represented at this point as “MUSIC.” At block 304, each letterof the word is converted into a letter number. If English is thelanguage in use, each upper case alphabetical letter of the 26 Latinletters used in English can be converted to an integer from 0 to 25 asfollows: A=0, B=1, C=2, D=3, E=4, F=5, G=6, H=7, 1=8, J=9, K=10, L=11,M=12, N=13, 0=14, P=15, Q=16, R=17, S=18, T=19, U=20, V=21, W=22, X=23,Y=24, and Z=25. The word “music” would then appear as: 12, 20, 18, 8, 2.A language based on an alphabet with more or less characters can berepresented by a larger or smaller integer space. The integer spacecould include, as an example, letters with specific types of accentmarks if these are important in the language of interest.

Continuing with FIG. 3, at block 306, processing device 108 calculatesthe sum of the position-th power of for each of the integers usedmultiplied by the letter number to determine the integer value of F. Fora word of length m, the sum of the position-th power of 26 for eachletter multiplied by the letter number is used. The equation for thepolynomial function F in this case is as follows:

${{F\left( {\alpha,k} \right)} = {\sum\limits_{k = 1}^{m}{\alpha 26^{k}}}},{\alpha \in \Gamma}$

For the word “music”:

F=12*26⁰+20*26¹+18*26²+8*26³+2*26⁴=1067260.

A DNA sequence consists of four nucleotides represented by the lettersA, T, C and G. Each nucleotide character, A, T, C and G, needs two bitsfor storage. FIG. 4 illustrates the process of block 210 of FIG. 2according to some aspects of the present disclosure. For the example ofFIG. 4, each nucleotide can be mapped to two binary digits as follows:A=00, T=01, C=10, and G=11. Assuming k=10 so that 10-mer DNA sequencesare to be used, at block 402, the remainder R from the moduluscalculation of block 208 can be retrieved from cached files 114. Theremainder can be expressed as:

R=mod(F,2²⁰).

For the word “music” the remainder is 18684.

At block 404 of FIG. 4, the remainder R is converted into a binary valuebR. The binary remainder bR is 20 digits or less. If the remainder isless than 20 digits, trailing zeros can be added to make bR 20 digitslong. For the word “music,” bR=10010001111110000000. At block 406, theremainder bR is separated into two-digit groups. Group 1 includes digitsfrom position 1 and 2 of bR, group 2 includes digits from position 3 and4 of bR, etc. At block 408, each two-digit group is mapped to anucleotide sequence. For example, each two-digit group can be mapped toa nucleotide sequence as follows: 00=A, 01=T, 10=C, and 11=G. Thus, the10-mer DNA sequence for the word “music” is in this example a mapping oftwo-digit groups to form the sequence GTATCCGAAA (SEQ ID NO: 1).

A code unit size is generally equivalent to the bit measurement for theparticular encoding. For example, an ASCII character in 8-bit ASCIIencoding is 8 bits (1 byte) long. If an English word contains m ASCIIcharacters, then the storage space needed for the word is 8 m. Forexample, the word communication contains 13 characters and would need104 bits storage space in ASCII computer files. By using 10-mer DNAencoding as described above, an English word needs 20 bits for storage,regardless of its length. DNA encoding as described herein thereforeprovides compression resulting in less storage space being used evenwhen the DNA sequences are maintained in digital format rather thanbeing synthesized into DNA.

FIG. 5 is the collision ratio diagram 500 for an example of DNA-encodedtext produced by a system for encoding and storing words in DNAsequences according to some aspects of the present disclosure. Thehighest collision ratio in the diagram 500 is less than 0.675%. The textsample used was, Brants, Thorsten et al., Web 1T 5-gram Version 1,LDC2006T13 on DVD, Linguistic Data Consortium, 2006.

The system discussed herein are not limited to any particular hardwarearchitecture or configuration. A computing device can include anysuitable arrangement of components that provides a result conditioned onone or more inputs. Suitable computing devices include multipurposemicroprocessor-based computing systems accessing stored software thatprograms or configures the computing system from a general-purposecomputing apparatus to a specialized computing apparatus implementingone or more aspects of the present subject matter. Any suitableprogramming, scripting, or other type of language or combinations oflanguages may be used to implement the teachings contained herein insoftware to be used in programming or configuring a computing device.

Aspects of the methods disclosed herein may be performed in theoperation of such computing devices. The order of the blocks presentedin the examples above can be varied—for example, blocks can bere-ordered, combined, or broken into sub-blocks. Certain blocks orprocesses can be performed in parallel.

The use of “configured to” herein is meant as open and inclusivelanguage that does not foreclose devices configured to performadditional tasks or steps. Additionally, the use of “based on” is meantto be open and inclusive, in that a process, step, calculation, or otheraction “based on” one or more recited conditions or values may, inpractice, be based on additional conditions or values beyond thoserecited. Headings, lists, and numbering included herein are for ease ofexplanation only and are not meant to be limiting.

The foregoing description of the examples, including illustratedexamples, of the subject matter has been presented only for the purposeof illustration and description and is not intended to be exhaustive orto limit the subject matter to the precise forms disclosed. Numerousmodifications, adaptations, and uses thereof will be apparent to thoseskilled in the art without departing from the scope of this subjectmatter. The illustrative examples described above are given to introducethe reader to the general subject matter discussed here and are notintended to limit the scope of the disclosed concepts.

What is claimed is:
 1. A system comprising: a processor; and a memorythat stores executable instructions that, when executed by theprocessor, facilitate performance of operations, comprising: receiving afirst word to be converted into a first DNA sequence; determining afirst value of a first polynomial function based on the first word,wherein the determining the first value of the first polynomial functioncomprises converting each letter of the first word to a first letternumber and calculating a first sum of a first position-th power of eachfirst letter number for each letter of the first word multiplied by thefirst letter number; obtaining a first remainder of a first modulus ofthe first value of the first polynomial function; converting the firstremainder of the first modulus of the first polynomial function into thefirst DNA sequence; synthesizing a first DNA molecule of the first DNAsequence; receiving a second word to be converted into a second DNAsequence; determining a second value of a second polynomial functionbased on the second word, wherein the determining the second value ofthe second polynomial function comprises converting each letter of thesecond word to a second letter number and calculating a second sum of asecond position-th power of each second letter number for each letter ofthe second word multiplied by the second letter number; obtaining asecond remainder of a second modulus of the second value of the secondpolynomial function; converting the second remainder of the secondmodulus of the second polynomial function into the second DNA sequence;and synthesizing a second DNA molecule of the second DNA sequence. 2.The system of claim 1, the operations further comprising: storing thesecond DNA molecule.
 3. The system of claim 1, wherein the second DNAsequence comprises a nucleotide sequence of a length corresponding to apower of two used to determine the second modulus.
 4. The system ofclaim 3, wherein the nucleotide sequence further comprises a mapping oftwo-digit groups from a binary value of the second remainder.
 5. Thesystem of claim 1, wherein the determining the second value of thesecond polynomial function based on the second word further comprisesconverting each letter of the second word to uppercase.
 6. The system ofclaim 1, wherein the converting the second remainder of the secondmodulus into the second DNA sequence comprises: separating a binaryvalue of the second remainder into a plurality of two-digit groups; andmapping the plurality of two-digit groups into a nucleotide sequence. 7.The system of claim 3, wherein the converting the second remainder ofthe second modulus into the second DNA sequence comprises: separating abinary value of the second remainder into a plurality of two-digitgroups; and mapping the plurality of two-digit groups into thenucleotide sequence.
 8. A method comprising: receiving, by a systemincluding a processor, a word to be converted into a DNA sequence;determining, by the system, a value of a polynomial function based onthe word, wherein the determining the value of the polynomial functioncomprises converting each letter of the word to a letter number andcalculating a sum of a position-th power of each letter number for eachletter multiplied by the letter number; obtaining, by the system, aremainder of a modulus of the value of the polynomial function;converting, by the system, the remainder of the modulus into the DNAsequence; and synthesizing, by the system, a DNA molecule from the DNAsequence.
 9. The method of claim 8, wherein the converting the remainderof the modulus into the DNA sequence comprises: separating a binaryvalue of the remainder into a plurality of two-digit groups; and mappingthe plurality of two-digit groups into the DNA sequence.
 10. The methodof claim 8, further comprising: receiving, by the system, a second wordto be converted into a second DNA sequence; determining, by the system,a second value of a second polynomial function based on the second word,wherein the determining the second value of the polynomial functioncomprises converting each letter of the second word to a second letternumber and calculating a second sum of a second position-th power ofeach second letter number for each letter multiplied by the secondletter number; obtaining, by the system, a second remainder of a secondmodulus of the value of the second polynomial function; converting, bythe system, the second remainder of the second modulus into the secondDNA sequence; and synthesizing a second DNA molecule from the second DNAsequence.
 11. The method of claim 10, wherein the second DNA sequencecomprises a nucleotide sequence of a length corresponding to a power oftwo used to determine the second modulus.
 12. The method of claim 11,wherein the nucleotide sequence further comprises a mapping of two-digitgroups from a binary value of the second remainder.
 13. The method ofclaim 8, wherein the determining the value of the polynomial functionbased on the word further comprises converting each letter of the wordto uppercase.
 14. A non-transitory computer-readable medium includingcomputer program code executable by a processor to cause the processorto perform operations, the operations comprising: receiving a firstword; converting the first word into a first DNA sequence; synthesizinga first DNA molecule from the first DNA sequence; receiving a secondword to be converted into a second DNA sequence; determining a value ofa polynomial function based on the second word, wherein the determiningthe value of the polynomial function comprises converting each letter ofthe second word to a letter number and calculating a sum of aposition-th power of each letter number for each letter multiplied bythe letter number; obtaining a remainder of a modulus of the value ofthe polynomial function; converting the remainder of the modulus intothe second DNA sequence; and synthesizing a second DNA molecule from thesecond DNA sequence.
 15. The non-transitory computer-readable medium ofclaim 14, wherein the converting the remainder of the modulus into thesecond DNA sequence comprises: separating a binary value of theremainder into a plurality of two-digit groups; and mapping theplurality of two-digit groups into a nucleotide sequence.
 16. Thenon-transitory computer-readable medium of claim 14, the operationsfurther comprising: storing the second DNA molecule.
 17. Thenon-transitory computer-readable medium of claim 14, wherein the secondDNA sequence comprises a nucleotide sequence of a length correspondingto a power of two used to determine the modulus.
 18. The non-transitorycomputer-readable medium of claim 17, wherein the nucleotide sequencefurther comprises a mapping of two-digit groups from a binary value ofthe remainder.
 19. The non-transitory computer-readable medium of claim14, wherein the determining the value of the polynomial function basedon the second word further comprises converting each letter of thesecond word to uppercase.
 20. The non-transitory computer-readablemedium of claim 14, wherein the converting the remainder of the modulusinto the second DNA sequence comprises: separating a binary value of theremainder into a plurality of two-digit groups; and mapping theplurality of two-digit groups into a nucleotide sequence.